<div id="content">

    <div id="content-header">

        <div id="breadcrumb"><a href="<?php echo site_url('Login/login') ?>" title="Go to Home" class="tip-bottom"><i
                class="icon-home"></i> 主页</a> <a href="#" class="current">运营管理</a></div>

        <h1>在线玩家</h1>

    </div>

    <div class="container-fluid">

        <hr>

        <div class="row-fluid">

            <div class="span12">
                <div class="widget-box">
                    <div class="widget-title"><span class="icon"><i class="icon-th"></i></span>
                        <h5>Data table</h5>
                    </div>

                    <div class="widget-content nopadding">
                        <table class="table table-bordered data-table">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th>昵称</th>
                                <th>房卡剩余数量</th>
                                <th>累计购卡张数</th>
                                <th>累计购卡金额</th>
                                <th>累计房卡消耗张数</th>
                                <th>所在房间号</th>
                                <th>胜局数</th>
                                <th>败局数</th>
                                <th>游戏类目</th>
                                <th>注册时间</th>
                                <th>在线时长</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php
                            $rows=$data[0];
                            foreach($rows as $value):
                            ?>
                            <tr class="gradeX">
                                <td><?php  echo $value['uid']?></td>
                                <td><?php  echo $value['NickName']?></td>
                                <td><?php  echo $value['RoomCard']?></td>
                                <td class="center"><?php  echo $value['tbc']?></td>
                                <td class="center"><?php  echo $value['tcc']?></td>
                                <td class="center"><?php  echo $value['tbm']?></td>
                                <td><?php echo $value['room_id']?></td>
                                <td><?php echo $value['win_number']?></td>
                                <td><?php echo $value['lose_number']?></td>
                                <td><?php echo $value['gid']?></td>
                                <td><?php echo $value['RegisterDate']?></td>
                                <td><?php echo $value['OnLineTimeCount']?></td>
                                <td>
				  <span>
                      <?php
                       $id=intval($value['id']);
                       $url=site_url("operate/doOnlineLogin/$id/no");
                       $url1=site_url("operate/doOnlineLogin/$id/yes");
?>
                      <button class="btn btn-danger btn-mini"
                              onClick="window.open('','_self')">强制下线
                    </button>
                      <?php
if($value['isLogin']==0):
?>
                      <button class="btn btn-warning btn-mini"
                              onClick="window.open('<?php echo $url;?>','_self')">
                                禁用
                    </button>
                      <?php
else:
?>
                      <button class="btn btn-warning btn-mini"
                              onClick="window.open('<?php echo $url1;?>','_self')">
                                启用
                    </button>
                      <?php endif;?>
				  </span>
                                </td>
                            </tr>
                            <?php    endforeach; ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

        </div>

    </div>

</div>